package com.zt.english.activity
import com.zt.english.R
import com.zt.english.databinding.ActivityArticleplayBinding
import com.zt.english.utils.SrtFileParasUtil
import com.zt.mvvm.view.BaseActivity

class ArticlePlayActivity : BaseActivity<ArticlePlayViewModel,ActivityArticleplayBinding>(){

    override fun initView() {
        /**
         * raw文件获取
         */
        val raw_ips = resources.openRawResource(R.raw.english_music)

        /**
         * assets文件获取
         */
        val assets_ips = resources.assets.open("麦田守望者.srt")

        val list = SrtFileParasUtil.parasSrt2List(assets_ips)
        if(list!=null){
            for (subtitles in list){
                System.out.println(subtitles.toString())
            }
            mDataBinding.subtitleview.setData(list)
            mDataBinding.subtitleview.seekTo(8235)
        }
    }

}